package com.aiit.controller;

import com.aiit.util.FileUploadUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件上传测试类
 */

@Controller
@RequestMapping("file")
public class FileUploadController {

    /**
     *  springmvc文件上传测试
     * @param upload
     * @throws Exception
     */
    @RequestMapping("fileUpload")
    public String testResponseJson(MultipartFile upload) throws Exception {
        FileUploadUtil.fileUpload(upload);
        return "Success";
    }

}
